<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>问候</title>
	</head>
	<body>
		<div id="shijian" /></div>
		<script type="text/javascript">
			function ss(){
				var today = new Date();
				var year = today.getFullYear();
				var month = today.getMonth();
				var day = today.getDate();
				var hours = today.getHours();
				var minutes = today.getMinutes();
				var second = today.getSeconds();
				var spm ;
				if(hours>12){
					spm = "下午好！";
				}
				else{
					spm = "上午好！";
				}
				document.getElementById("shijian").innerHTML="今天日期："
				+ year + "年" +(month+1)+ "月"+ day+ "日"
				+"<br/>"+"现在时间："+ hours +"点"+minutes + "分"
				+"<br/>"+spm+"欢迎来到贵美"
				
				
			}
			var myTime = setInterval("ss()",1000);
			
			
		</script>
		
	</body>
</html>
